<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style>
			canvas {
				background-color: #00FFFF;
			}
			img{
				display: none;
			}
		</style>
	</head>
	<body>
		<div>
			<p>测试html使用canvas</p>
			<canvas id="canva" width="200" height="200"></canvas>
			<img id="img" src="img/1.png" style="width: 100px;height: 100px;" />
		</div>
	</body>
	<script>
		window.onload = function() {
			var img = document.getElementById("img");
			var c = document.getElementById("canva");
			var cxt = c.getContext("2d");
			cxt.drawImage(img, 0, 0, 80, 80)
		}
	</script>
</html>
